Pytorch教程

PyTorch-Tutorial

与之配套的说明教程:
pytorch动态神经网络

《深度学习框架PyTorch:入门与实践》

softmax分类器
fast rcnn

pytorch中文文档

理解

torch.FloatTensor 相比于numpy,可以使用GPU
Variable 相比于Tensor,可以定义计算图,用于自动计算梯度

The biggest difference between the two is that TensorFlow’s computational graphs are static and PyTorch uses dynamic computational graphs.

TensorFlow是静态的计算图,而pytorch用动态计算图

Dogs vs. Cats Kaggle

PyTorch实战指南6-知乎

1
2
3
4
5
CUDA_VISIBLE_DEVICES=1 python my_script.py

CUDA_VISIBLE_DEVICES=0 python main.py train --train-data-root=./data/train/train --use-gpu=True --env=classifier

CUDA_VISIBLE_DEVICES=0 python main.py test --load-model-path=./checkpoints/resnet34_0426_17\:40\:25.pth

使用Jupyter notebook或IPython等交互式调试

二分类随机瞎蒙的loss在0.69左右

0.9这个loss很高 二分类随机瞎蒙的loss应该在0.69左右。

而且学习率太大了

建议用resnet 34 学习率 0.001 adam优化器